package com.itheima.practice01;

/*
打印三角形

分析:
*           1--1
**          2--2
***         3--3
****        4--4

****
***
**
*
   *
  **
 ***
****


 */

public class TestDome01 {

    public static void main(String[] args) {
       /* for (int i =0; i<4; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print("*");
            }
            System.out.println("*");
        }
*/

   /*     for (int i =4; i>0; i--) {
            for (int j = 1; j < i; j++) {
                System.out.print("*");
            }
            System.out.println("*");
        }*/


        for (int i =0; i<4; i++) {
            for (int j =3; j >i ; j--) {
                System.out.print(" ");
            }
            System.out.println("*");
        }





    }
}
